package ecom.appcode.business;

import java.util.List;

import ecom.appcode.common.daobean.ContactDaoBean;
import ecom.appcode.dao.daointerface.ContactDao;
import ecom.appcode.dao.daointerface.ContactDaoImpl;

public class ContactLogicImpl implements ContactLogic{
    
    /** Send Contact */
    public boolean sendContact(String title, String email, String content){
        ContactDao contact = new ContactDaoImpl();
        boolean result = contact.sendContact(title, email, content);
        return result;
    }
    
    /** View All Contact */
    public List<ContactDaoBean> viewAllContact() {
        ContactDao contact = new ContactDaoImpl();
        List<ContactDaoBean> list = contact.viewAllContact();
        return list;
    }
    
    /** Delete Contact */
    public boolean deleteContact(int contactID) {
        ContactDao contact = new ContactDaoImpl();
        boolean result = contact.deleteContact(contactID);
        return result;
    }
}
